package com.letoken.platform.repo.app.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * Le账户-用户铸币发行记录
 * </p>
 *
 * @author 作者
 * @since 2022-12-09
 */
@Getter
@Setter
@TableName("app_user_issue_record")
@ApiModel(value = "AppUserIssueRecord对象", description = "Le账户-用户铸币发行记录")
public class AppUserIssueRecord extends Model<AppUserIssueRecord> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("订单号")
    @TableField("sn")
    private String sn;

    @ApiModelProperty("发行数量")
    @TableField("issue_amount")
    private BigDecimal issueAmount;

    @ApiModelProperty("待流通")
    @TableField("wait_circulation")
    private BigDecimal waitCirculation;

    @ApiModelProperty("已流通")
    @TableField("circulation")
    private BigDecimal circulation;

    @ApiModelProperty("流通总量")
    @TableField("total_circulation")
    private BigDecimal totalCirculation;

    @ApiModelProperty("流通状态（0流通未结束，1流通已结束）")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("发行时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty("流通周期")
    @TableField("circulate_round")
    private Integer circulateRound;

    @ApiModelProperty("当期释放数量")
    @TableField(exist = false)
    private BigDecimal amount;

    @ApiModelProperty("一共释放周期")
    @TableField(exist = false)
    private Integer round;

    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
